//
//  MainCell.m
//  4.7
//
//  Created by 王奎卿 on 2017/4/7.
//  Copyright © 2017年 wkq. All rights reserved.
//

#import "MainCell.h"

@implementation MainCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self.contentView addSubview:self.img];
        [self.contentView addSubview:self.titleLab];
        [self.contentView addSubview:self.subLab];
        [self.contentView addSubview:self.typeLab];
    }
    return self;
}

- (UIImageView *)img
{
    if (!_img)
    {
        _img = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 10, 10)];
        _img.backgroundColor = [UIColor redColor];
    }
    return _img;
}

- (UILabel *)titleLab
{
    if (!_titleLab)
    {
        CGSize size = [UIScreen mainScreen].bounds.size;
        _titleLab = [[UILabel alloc]initWithFrame:CGRectMake(22, 10, size.width-150, 10)];
        _titleLab.text = @"联想集团北京分公司上地公司";
        _titleLab.textColor = [UIColor lightGrayColor];
    }
    return _titleLab;
}

- (UILabel *)subLab
{
    if (!_subLab)
    {
        CGSize size = [UIScreen mainScreen].bounds.size;
        _subLab = [[UILabel alloc]initWithFrame:CGRectMake(22, 35, size.width-150, 10)];
        _subLab.text = @"IT电商";
        _subLab.textColor = [UIColor lightGrayColor];
        _subLab.font = [UIFont systemFontOfSize:13];
    }
    return _subLab;
}

- (UILabel *)typeLab
{
    if (!_typeLab)
    {
        CGSize size = [UIScreen mainScreen].bounds.size;
        _typeLab = [[UILabel alloc]initWithFrame:CGRectMake(size.width-100, 10, 100, 10)];
        _typeLab.text = @"大型客户";
        _typeLab.textColor = [UIColor lightGrayColor];
        _typeLab.font = [UIFont systemFontOfSize:13];
    }
    return _typeLab;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
